1. Field of the Invention
The present invention relates to a method of mirroring of data in a copy destination device and a copy source device.
2. Description of the Related Art
With reference to FIGS. 13, 14, copy destination device in a dual-storage apparatus stores user data on storage area. The storage area is partitioned into a plurality of blocks M0, M1, M2, . . . , identical to each other in memory size (such as M bits). When a user performs a write process on a copy destination device 101 during a copy suspend mode, bit-map data stored in the copy destination device 101 must be transmitted to a copy source device 100 to assure consistency. The bit-map data 3a in the copy destination device 101 indicates that the transfer of user data to the copy source device 100 is necessary to assure consistency of the data.
As shown in FIG. 13, the bit map is composed of m0, m1, m2, . . . respectively, mapped to the blocks M0, M1, M2, . . . . The bits m0, m1, m2, . . . in the bit map respectively correspond to M bits as the size of each block. For example, if the block M1 is rewritten in the copy destination device 101, “1” is written on the bit m1 corresponding to the block M1 to indicate that the bit m1 is rewritten in the copy destination device 101 but not yet transferred to the copy source device 100.
Thereafter, The copy destination device 101 transfers the bit map to the copy source device 100 during a copy resume mode. The copy source device 100, based upon the received bit map from the copy destination device 101, acquites from a the copy destination device 101 the position of the updated user data in the copy destination device 101 that need to be transferred as a data block to the copy source device 100, the storage size M, and the block M1 with a front-end address A thereof rewritten in the copy destination device 101. Matching between the copy source device 100 and the copy destination device 101 is thus achieved.
The copy source device 100 has also the same user data storage area and the same bit-map structure as those of the copy destination device 100.
In a known resume function for remote copying shown in FIG. 14, the copy source device 100 acquires a bit map managing copy data from a remote device, such as a copy destination device 101 after the copy source device 100 acquires receives a copy resume command from a host 104. The copy source device 100 returns A reply to the copy resume command to the host 104 after the copy source device 100 merges the bit map of copy destination device 101 with a bit map of the copy source device 100.
As shown in FIG. 14, the following process steps (1401), (1402), and (1403) are performed after receiving the copy resume command issued from the host 104.
(1401) The host 104 issues to the copy source device 100 the copy resume command indicating copy restarting. The copy source device 100 requests the copy destination device 101 to transfer the bit map of the copy destination device 101.
(1402) In response, the copy destination device 101 transfers bit map data.
(1403) The copy source device 100 merges the bit map acquired from the copy destination device 101 with all bit maps stored in the copy source device 100, and then returns a reply command to the host 104; the copy source device 100 receives the bit map of the copy destination device 101 from the copy destination device 100 and updates the bit maps stored in the copy source device 100.
If the size of a copy session is large (if the number of bit maps is large), the amount of bit-map information transmitted from the copy destination device 101 as a partner increases, and time required for a merge process increases. For example, even if the merge process is completed within time-out of copying by a host command, unupdated bit-map data can be transferred and merged. If the amount of updated user data on the copy destination device is small, unnecessary bit map data transfer is performed at operation (2) in FIG. 14.
In a storage apparatus, a first volume and a second volume are paired with each other for data backup. After the two volumes are shifted from a dual mode to a separate mode, the storage apparatus manages a storage area in which data is written on the first volume. A memory unit is set up in the storage device as a management unit for managing the storage area on which data writing is performed. The memory unit corresponds to a storage area on the first volume equal to a maximum transfer length transferable at one time in the data copying from the first volume to the second volume. The management unit corresponding to the storage area on which data writing has been performed is identified. A flag indicating that data writing has been performed on the identified management unit is set. This data backup method is proposed in Japanese Unexamined Patent Application Publication No. 2003-173240.
In accordance with the Japanese Unexamined Patent Application Publication No. 2003-173240, the second volume compares the bit map from the first volume byte by byte and if a difference exists the bit map information is copied to update the bit map itself on second volume. Even if the bit map of the first volume is unupdated with all zeroes, the bit map needs to be merged with the bit map volume. The needless process is thus performed.